﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;

public partial class userCenter : System.Web.UI.Page
{
    protected string Localhost;
    protected string uid;
    protected bool isAvatar;
    protected void Page_Load(object sender, EventArgs e)
    {
        int port = HttpContext.Current.Request.Url.Port;
        string ApplicationPath = HttpContext.Current.Request.ApplicationPath != "/" ? HttpContext.Current.Request.ApplicationPath : string.Empty;
        uid = "1";
        Localhost = string.Format("{0}://{1}{2}{3}",
                             HttpContext.Current.Request.Url.Scheme,
                             HttpContext.Current.Request.Url.Host,
                             (port == 80 || port == 0) ? "" : ":" + port,
                             ApplicationPath);
        isAvatar = File.Exists(HttpContext.Current.Request.MapPath(string.Format("Avatar//avatars//{0}//medium.jpg", uid)));
    }
}
